package com.ssjhs.installservice;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;

public class ManagerService extends Service {
    private static final String TAG = "ManagerService";

    private AidlImplement mBinder = new AidlImplement();
    private UdpServer mUdpServer;

//    private NetworkManage mNetworkManage;

    @Override
    public void onCreate() {
        super.onCreate();
        Log.d(TAG, "onCreate");
        Toast.makeText(this, "App Manager Service 启动成功了哈", Toast.LENGTH_LONG).show();

        mUdpServer = new UdpServer();
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.d(TAG, "onStartCommand");
        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.d(TAG, "onDestroy");
    }

    @Override
    public IBinder onBind(Intent intent) {
        Log.d(TAG, "onBind");
        return mBinder;  //在这里返回新建的MyBinder类
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.d(TAG, "onUnbind");
        return super.onUnbind(intent);
    }

}
